import os




def get_file_path(root_dir):
    file_list=os.walk(root_dir)
    for root,dirs,files in file_list:
        for f in files:
            path=os.path.join(root,f)
            yield path
    
def count_files(root_dir):
    count=0
    file_path_list=get_file_path(root_dir)
    for path in file_path_list:
        count+=1
        if os.path.getsize(path)<=10:
            print path
    return count

root_dir=r'C:\htmls\media\html\delta\iteye'
count=count_files(root_dir)
print ''
print count
print 'end'
